// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "MotionAnimInfos.h"
#include "Layers/MotionSubtitlesLayerBase.h"
#include "CurveWrappers/FloatCurveWrapper.h"
#include "UObject/Object.h"

/**
 * 
 */
class FActionBase 
{

public:
	
	EAnimDirection Direction;
	
	EAnimTarget AnimTarget;

	int32 ElementId;

	TWeakObjectPtr<UCurveFloat> Curve;

	TWeakObjectPtr<UFloatCurveWrapper> CurveWrapper;

	TWeakObjectPtr<UMotionSubtitlesLayerBase> Layer;

	float Timer;

	// 当DispatchMode为ContentElement时才生效
	float StartOffset;
	
	float BeginTime;
	
	float EndTime;

	float Duration;
	
	bool IsTriggered;
	
	bool IsCompleted;
public:
	FActionBase();
	virtual ~FActionBase();
	
public:
	virtual void OnInit();
	virtual void OnBegin();
	virtual void OnTick(float DeltaTime);
	virtual void OnEnd();
	virtual void OnExit();
};
